package com.lanou3g.mynewstest.module.news.headline;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.util.Log;

import com.lanou3g.mynewstest.R;
import com.lanou3g.mynewstest.base.MyBaseActivity;
import com.lanou3g.mynewstest.beans.NewsHeadlineBeans;
import com.lanou3g.mynewstest.beans.NewsPhotoSetBeans;

/**
 * Created by dllo on 16/1/15.
 */
public class PhotoSetActivity extends MyBaseActivity {
    private static Context context;
    private static NewsPhotoSetBeans data;
    private ViewPager vp;
    private PhotoSetAdapter adapter;

    public static void goToPhotoSetActivity(Context context, NewsPhotoSetBeans data) {
        PhotoSetActivity.context = context;
        PhotoSetActivity.data = data;
        Intent intent = new Intent(context, PhotoSetActivity.class);
        context.startActivity(intent);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_photoset);
        vp = (ViewPager) findViewById(R.id.photoset_vp);
        adapter = new PhotoSetAdapter(context, data);
        vp.setAdapter(adapter);
    }
}
